home *** CD-ROM | disk | FTP | other *** search
/ Erotic Games: Memory / Erotic Games: Memory.iso / mac / air_installers / AdobeAIR.exe / setup.swf / scripts / mx / skins / halo / HaloFocusRect.as < prev    next >
Text File  |  2009-02-12  |  6KB  |  182 lines

  1. package mx.skins.halo
  2. {
  3.    import flash.display.Graphics;
  4.    import mx.core.mx_internal;
  5.    import mx.skins.ProgrammaticSkin;
  6.    import mx.styles.CSSStyleDeclaration;
  7.    import mx.styles.IStyleClient;
  8.    import mx.utils.GraphicsUtil;
  9.    
  10.    use namespace mx_internal;
  11.    
  12.    public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient
  13.    {
  14.       
  15.       mx_internal static const VERSION:String = "3.0.0.0";
  16.        
  17.       
  18.       private var _focusColor:Number;
  19.       
  20.       public function HaloFocusRect()
  21.       {
  22.          super();
  23.       }
  24.       
  25.       public function get inheritingStyles() : Object
  26.       {
  27.          return styleName.inheritingStyles;
  28.       }
  29.       
  30.       public function set inheritingStyles(param1:Object) : void
  31.       {
  32.       }
  33.       
  34.       public function notifyStyleChangeInChildren(param1:String, param2:Boolean) : void
  35.       {
  36.       }
  37.       
  38.       public function registerEffects(param1:Array) : void
  39.       {
  40.       }
  41.       
  42.       public function regenerateStyleCache(param1:Boolean) : void
  43.       {
  44.       }
  45.       
  46.       public function get styleDeclaration() : CSSStyleDeclaration
  47.       {
  48.          return CSSStyleDeclaration(styleName);
  49.       }
  50.       
  51.       public function getClassStyleDeclarations() : Array
  52.       {
  53.          return [];
  54.       }
  55.       
  56.       public function get className() : String
  57.       {
  58.          return "HaloFocusRect";
  59.       }
  60.       
  61.       public function clearStyle(param1:String) : void
  62.       {
  63.          if(param1 == "focusColor")
  64.          {
  65.             _focusColor = NaN;
  66.          }
  67.       }
  68.       
  69.       public function setStyle(param1:String, param2:*) : void
  70.       {
  71.          if(param1 == "focusColor")
  72.          {
  73.             _focusColor = param2;
  74.          }
  75.       }
  76.       
  77.       public function set nonInheritingStyles(param1:Object) : void
  78.       {
  79.       }
  80.       
  81.       public function get nonInheritingStyles() : Object
  82.       {
  83.          return styleName.nonInheritingStyles;
  84.       }
  85.       
  86.       override protected function updateDisplayList(param1:Number, param2:Number) : void
  87.       {
  88.          var _loc12_:Number = NaN;
  89.          var _loc13_:Number = NaN;
  90.          var _loc14_:Number = NaN;
  91.          var _loc15_:Number = NaN;
  92.          var _loc16_:Number = NaN;
  93.          var _loc17_:Number = NaN;
  94.          super.updateDisplayList(param1,param2);
  95.          var _loc3_:String = getStyle("focusBlendMode");
  96.          var _loc4_:Number = getStyle("focusAlpha");
  97.          var _loc5_:Number = getStyle("focusColor");
  98.          var _loc6_:Number = getStyle("cornerRadius");
  99.          var _loc7_:Number = getStyle("focusThickness");
  100.          var _loc8_:String = getStyle("focusRoundedCorners");
  101.          var _loc9_:Number = getStyle("themeColor");
  102.          var _loc10_:Number = _loc5_;
  103.          if(isNaN(_loc10_))
  104.          {
  105.             _loc10_ = _loc9_;
  106.          }
  107.          var _loc11_:Graphics;
  108.          (_loc11_ = graphics).clear();
  109.          blendMode = _loc3_;
  110.          if(_loc8_ != "tl tr bl br" && _loc6_ > 0)
  111.          {
  112.             _loc12_ = 0;
  113.             _loc13_ = 0;
  114.             _loc14_ = 0;
  115.             _loc15_ = 0;
  116.             _loc16_ = _loc6_ + _loc7_;
  117.             if(_loc8_.indexOf("tl") >= 0)
  118.             {
  119.                _loc12_ = _loc16_;
  120.             }
  121.             if(_loc8_.indexOf("tr") >= 0)
  122.             {
  123.                _loc14_ = _loc16_;
  124.             }
  125.             if(_loc8_.indexOf("bl") >= 0)
  126.             {
  127.                _loc13_ = _loc16_;
  128.             }
  129.             if(_loc8_.indexOf("br") >= 0)
  130.             {
  131.                _loc15_ = _loc16_;
  132.             }
  133.             _loc11_.beginFill(_loc10_,_loc4_);
  134.             GraphicsUtil.drawRoundRectComplex(_loc11_,0,0,param1,param2,_loc12_,_loc14_,_loc13_,_loc15_);
  135.             _loc12_ = !!_loc12_ ? Number(_loc6_) : Number(0);
  136.             _loc14_ = !!_loc14_ ? Number(_loc6_) : Number(0);
  137.             _loc13_ = !!_loc13_ ? Number(_loc6_) : Number(0);
  138.             _loc15_ = !!_loc15_ ? Number(_loc6_) : Number(0);
  139.             GraphicsUtil.drawRoundRectComplex(_loc11_,_loc7_,_loc7_,param1 - 2 * _loc7_,param2 - 2 * _loc7_,_loc12_,_loc14_,_loc13_,_loc15_);
  140.             _loc11_.endFill();
  141.             _loc16_ = _loc6_ + _loc7_ / 2;
  142.             _loc12_ = !!_loc12_ ? Number(_loc16_) : Number(0);
  143.             _loc14_ = !!_loc14_ ? Number(_loc16_) : Number(0);
  144.             _loc13_ = !!_loc13_ ? Number(_loc16_) : Number(0);
  145.             _loc15_ = !!_loc15_ ? Number(_loc16_) : Number(0);
  146.             _loc11_.beginFill(_loc10_,_loc4_);
  147.             GraphicsUtil.drawRoundRectComplex(_loc11_,_loc7_ / 2,_loc7_ / 2,param1 - _loc7_,param2 - _loc7_,_loc12_,_loc14_,_loc13_,_loc15_);
  148.             _loc12_ = !!_loc12_ ? Number(_loc6_) : Number(0);
  149.             _loc14_ = !!_loc14_ ? Number(_loc6_) : Number(0);
  150.             _loc13_ = !!_loc13_ ? Number(_loc6_) : Number(0);
  151.             _loc15_ = !!_loc15_ ? Number(_loc6_) : Number(0);
  152.             GraphicsUtil.drawRoundRectComplex(_loc11_,_loc7_,_loc7_,param1 - 2 * _loc7_,param2 - 2 * _loc7_,_loc12_,_loc14_,_loc13_,_loc15_);
  153.             _loc11_.endFill();
  154.          }
  155.          else
  156.          {
  157.             _loc11_.beginFill(_loc10_,_loc4_);
  158.             _loc17_ = (_loc6_ > 0 ? _loc6_ + _loc7_ : 0) * 2;
  159.             _loc11_.drawRoundRect(0,0,param1,param2,_loc17_,_loc17_);
  160.             _loc17_ = _loc6_ * 2;
  161.             _loc11_.drawRoundRect(_loc7_,_loc7_,param1 - 2 * _loc7_,param2 - 2 * _loc7_,_loc17_,_loc17_);
  162.             _loc11_.endFill();
  163.             _loc11_.beginFill(_loc10_,_loc4_);
  164.             _loc17_ = (_loc6_ > 0 ? _loc6_ + _loc7_ / 2 : 0) * 2;
  165.             _loc11_.drawRoundRect(_loc7_ / 2,_loc7_ / 2,param1 - _loc7_,param2 - _loc7_,_loc17_,_loc17_);
  166.             _loc17_ = _loc6_ * 2;
  167.             _loc11_.drawRoundRect(_loc7_,_loc7_,param1 - 2 * _loc7_,param2 - 2 * _loc7_,_loc17_,_loc17_);
  168.             _loc11_.endFill();
  169.          }
  170.       }
  171.       
  172.       override public function getStyle(param1:String) : *
  173.       {
  174.          return param1 == "focusColor" ? _focusColor : super.getStyle(param1);
  175.       }
  176.       
  177.       public function set styleDeclaration(param1:CSSStyleDeclaration) : void
  178.       {
  179.       }
  180.    }
  181. }
  182.